package com.jincheng.activity;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuItem;

public class BaseActivity extends Activity {
	
	protected SharedPreferences sp;
	protected String number;
	
	private String wupeng;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		sp = PreferenceManager.getDefaultSharedPreferences(this);
		number = sp.getString("number", "8");
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		menu.add(0, 0, 0, R.string.setting);
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		if(item.getItemId() == 0){
			Intent setIntent = new Intent(this,SettingActivity.class);
			startActivity(setIntent);
		}
		return super.onOptionsItemSelected(item);
	}
}
